<!DOCTYPE html>
<html>
	<head>
		<title>Countdown</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
		<script type="text/javascript" src="./js/jquery-1.4.1.js"></script>
		<script type="text/javascript" src="./js/jquery.stream.js"></script>
		<script type="text/javascript">
		$(function() {
			$.stream("./countdown.jsp", {reconnect: false});
			
			$(document)
			.streamOpen(function(e, event) {
				$("<p />").appendTo("body").text("Open, id: " + event.target.id);
			})
			.streamMessage(function(e, event) {
				$("<p />").appendTo("body").text(event.data);
			})
			.streamError(function() {
				$("<p />").appendTo("body").text("Error");
			})
			.streamClose(function() {
				$("<p />").appendTo("body").text("Close");
			});
		});
		</script>
	</head>
	<body>
	</body>
</html>
